import request from '@/utils/request'

// 获取公告列表
export const announcementListService = () => {
  return request.get('/api/announcement')
}

// 获取已发布的公告列表
export const announcementPublishedService = () => {
  return request.get('/api/announcement/published')
}

// 添加公告
export const announcementAddService = (data) => {
  return request.post('/api/announcement', data)
}

// 更新公告
export const announcementUpdateService = (data) => {
  return request.put('/api/announcement', data)
}

// 删除公告
export const announcementDeleteService = (id) => {
  return request.delete(`/api/announcement/${id}`)
} 